Optimal. Leaf size=66 \[ -\frac{b^2 \log (a \cos (c+d x)+b \sin (c+d x))}{a d \left (a^2+b^2\right )}-\frac{b x}{a^2+b^2}+\frac{\log (\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0762826, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3571, 3530, 3475} \[ -\frac{b^2 \log (a \cos (c+d x)+b \sin (c+d x))}{a d \left (a^2+b^2\right )}-\frac{b x}{a^2+b^2}+\frac{\log (\sin (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3571
Rule 3530
Rule 3475
Rubi steps
\begin{align*} \int \frac{\cot (c+d x)}{a+b \tan (c+d x)} \, dx &=-\frac{b x}{a^2+b^2}+\frac{\int \cot (c+d x) \, dx}{a}-\frac{b^2 \int \frac{b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a \left (a^2+b^2\right )}\\ &=-\frac{b x}{a^2+b^2}+\frac{\log (\sin (c+d x))}{a d}-\frac{b^2 \log (a \cos (c+d x)+b \sin (c+d x))}{a \left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [C] time = 0.156277, size = 91, normalized size = 1.38 \[ -\frac{\frac{2 b^2 \log (a+b \tan (c+d x))}{a^3+a b^2}+\frac{\log (-\tan (c+d x)+i)}{a+i b}+\frac{\log (\tan (c+d x)+i)}{a-i b}-\frac{2 \log (\tan (c+d x))}{a}}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.067, size = 95, normalized size = 1.4 \begin{align*} -{\frac{a\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d \left ({a}^{2}+{b}^{2} \right ) }}-{\frac{b\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) }}+{\frac{\ln \left ( \tan \left ( dx+c \right ) \right ) }{ad}}-{\frac{{b}^{2}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.57049, size = 113, normalized size = 1.71 \begin{align*} -\frac{\frac{2 \, b^{2} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{3} + a b^{2}} + \frac{2 \,{\left (d x + c\right )} b}{a^{2} + b^{2}} + \frac{a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} - \frac{2 \, \log \left (\tan \left (d x + c\right )\right )}{a}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.14481, size = 231, normalized size = 3.5 \begin{align*} -\frac{2 \, a b d x + b^{2} \log \left (\frac{b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) -{\left (a^{2} + b^{2}\right )} \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \,{\left (a^{3} + a b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 10.9664, size = 626, normalized size = 9.48 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27943, size = 119, normalized size = 1.8 \begin{align*} -\frac{\frac{2 \, b^{3} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{3} b + a b^{3}} + \frac{2 \,{\left (d x + c\right )} b}{a^{2} + b^{2}} + \frac{a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} - \frac{2 \, \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]